﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace copy2smug
{
    public partial class flickrAuth : Form
    {
        public flickrAuth()
        {
            InitializeComponent();

            this.Refresh();
        }

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            if (e.Url.AbsoluteUri == "http://www.flickr.com/services/auth/")
                this.Close();

            if (e.Url.AbsoluteUri == "http://www.flickr.com/") // user has not authorised app
            {
                MessageBox.Show("You can't use this application without authorising Flickr.  Please try authorising again.");
                this.Close();
            }
        }
    }
}
